<?php $item = $this->currentItem;//Update?>
 <div class="textcontent">
            <h3 class="title">CẬP NHẬP TIN TỨC </h3>
			<div class="messagebox" style="display:none">
            	<p>Lỗi phát sinh hiện lên ngay đây</p>
            	<p>Lưu không thành công</p>                
            </div>
<!-- tab "panes" -->
<div class="panes">
	 <form name="mainForm" id="mainForm" method="post" action="">
	 <input name="id" type="hidden" value="<?php echo $item['clip_id']?>">
	            <table class="tblnhaplieu">
	            <tbody>
                	<tr>
                    	<td width="100px" align="right">Ngôn Ngữ</td>
                        <td width="15px" align="center"><span style="color:#900">*</span></td>
                        <td><b><?php echo $this->allLang[$this->defaultCMSLANG]['title']?></b> 
                        	<input type="hidden" name='language' id='language' value="<?php echo $this->defaultCMSLANG;?>">
                        </td>
                    </tr>
                    <tr>
                    	<td align="right">Tiêu Đề</td>
                        <td width="15px" align="center">&nbsp;</td>
                        <td><input name="clip_title" id="clip_title" value="<?php echo $item['clip_title'];?>" type="text" size="50" /></td>
                    </tr>
<!--                    <tr>
                    	<td align="right">Thuộc Phân Loại:</td>
                        <td width="15px" align="center">&nbsp;</td>
                        <td>
                        	<select name=categories_id id="categories_id">
                        		<option value="0">[ Gốc ]</option>
                        	<?php foreach ($this->catTree as $itemS):?>
                        		<?php if ($item['categories_id'] == $itemS['id']):?>
                        			<option selected="selected" value="<?php echo $itemS['id']?>"><?php echo $itemS['title']?></option>
                        		<?php else:?>
                        			<option value="<?php echo $itemS['id']?>"><?php echo $itemS['title']?></option>
                        		<?php endif;?>
                        	<?php endforeach;?>	
                        	</select>
                    </tr>-->
                     <?php
             	$tmpLabel = array(
             		'Thuộc Tính 01','Thuộc Tính 02','Thuộc Tính 03','Thuộc Tính 04',
             	);
            	for($i=0;$i<0;$i++):?>       
                    <tr>
                    	<td align="right"><?php echo $tmpLabel[$i]?></td>
                        <td width="15px" align="center">&nbsp;</td>
                        <td><input name="clip_p<?php echo $i?>" id="clip_p<?php echo $i?>" value="<?php echo $item['clip_p'.$i];?>" type="text" size="50" /></td>
                    </tr>
                    <?php endfor;?>
            <?php
             	$tmpLabel = array(
             		'Hình Ảnh Minh Họa','File Clip','Hình 03','Hình 04','Hình 05'
             	);
            	for($i=0;$i<1;$i++):?>
                    <tr>
                    	<td align="right"><?php echo $tmpLabel[$i];?></td>
                        <td width="15px" align="center">&nbsp;</td>
                        <td><img width="120px" id="contents_image_show_clip_img<?php echo $i;?>" src="<?php echo $item['clip_img'.$i];?>" style="display:none"/>
                        <input type="text" name="clip_img<?php echo $i?>" value="<?php echo $item['clip_img'.$i];?>" id="clip_img<?php echo $i;?>" size="50" />
                        <input type="button" class="image_browser" rel='clip_img<?php echo $i?>' value="Upload">
                        <input type="button" class="image_browser_delete" rel='clip_img<?php echo $i?>' value="Xóa">
                        </td>
                    </tr>
            <?php endfor;?>  
            <?php
             	$tmpLabel = array(
             		'Mô tả ngắn','Mô tả ngắn 02','Mô tả ngắn 03'
             	);
             	
            	for($i=0;$i<1;$i++):?>
                     <tr>
                    	<td align="right"><?php echo $tmpLabel[$i]?></td>
                        <td width="15px" align="center">&nbsp;</td>
                        <td><textarea name="clip_sortdes<?php echo $i?>" rows="5" cols="70"><?php echo $item['clip_sortdes'.$i];?></textarea></td>
                    </tr>
            <?php endfor;?>
            <?php
             	$tmpLabel = array(
             		'Chi tiết:','Nội dung chi tiết 02:','Nội dung chi tiết 03:'
             	);
             	for($i=0;$i<1;$i++):?>              
                    <tr>
                    	<td align="right"><?php echo $tmpLabel[$i]?></td>
                      <td width="15px" align="center">&nbsp;</td>
                        <td>
                        	<?php echo $this->editor("clip_des".$i,$item['clip_des'.$i],'vi');?>
                        </td>
                    </tr>
            <?php endfor;?>
            <!--     
            		<tr>
                    	<td align="right">Hiện trên trang chủ:</td>
                        <td width="15px" align="center">&nbsp;</td>
                        <td>
                        	<input <?php echo empty($item['clip_showtype'])?"":"checked='checked'"?>  type="checkbox" value="<?php echo Henry_Clip_Clip::SHOW_INHOME_PAGE?>" id="clip_showtype" name="clip_showtype">                        	
                        </td>
                    </tr>
              -->           
<!--                    <tr>
                    	<td align="right">Trạng Thái:</td>
                      <td width="15px" align="center">&nbsp;</td>
                        <td>
                        	<?php
                        	$value = array(
                        		'1' => ' Hiện Thị',
                        		'0' => ' Tạm Khóa'
                        	); 
                        	$choose = $item['clip_status']==""?"1":$item['clip_status'];
                        	echo $this->formRadio("clip_status",$choose,null,$value," - ");?>
                        </td>
                    </tr>-->
                    <tr>
                    	<td align="right"></td>
                        <td width="15px" align="center"><span style="color:#900"></span></td>
                        <td><input type="submit" class="btn" value="Lưu thông tin" /></td>
                    </tr>
                    </tbody>
                </table>
        </form>	
</div>
</div>
<?php echo $this->ckfinderPopupInit();?>
<?php $this->headScript()->captureStart() ?>
	$(document).ready(function(){
		//-------------------------------------
		//Xy ly image Anh
		$(".image_browser").click(function(){
				var rel = $(this).attr('rel');  
				BrowseServer('Images:/',rel,'contents_image_show_'+rel);
		});
		//Xoa anh
		$(".image_browser_delete").click(function(){
			$("#"+$(this).attr('rel')).val("");
			$("#contents_image_show_"+$(this).attr('rel')).css("display","none");
		});
		<?php for($i=0;$i<10;$i++):?> 
			<?php if (!empty($item['clip_img'.$i])):?>
				$("#contents_image_show_clip_img<?php echo $i?>").css('display','block');
			<?php endif;?>
		<?php endfor;?>
		//Du lieu Mau
		$(".datadefault_ckeditor").click(function(){
			var fileName = $(this).attr('rel');
			$.post(
				'<?php echo $this->baseUrl()."/clip/getsampledata"?>',
				{
					'filename' : fileName
				},
				function(data){
					var apiFunction = "api_"+fileName+".setData(data.replace(/\"/g,'\\\"'))";
					eval(apiFunction);
				}
			); 
		});
		//------------------------------------
		$("input[name=chkall]:checkbox").click(function(){
		});		
	});
<?php $this->headScript()->captureEnd() ?>